<html>
    <body style="background: url(images/background.jpg);">
        <?php
            require 'config/dataSource.php';
            session_start();  
        ?>
         <div>
    <h1><a href="forumIndex.php?<?php echo htmlspecialchars(SID); ?>">Return to Forum Index</a></h1>
    <h1><a href="topicIndex.php?<?php echo htmlspecialchars(SID); ?>">Return to Topic Index</a></h1>
    <h1><a href="createReply.php?<?php echo htmlspecialchars(SID); ?>">Reply to Topic</a></h1>
        </div>
        <center><table border="2" bgcolor="#FFFFCC">
                <tr bgcolor="E8E8E8">
                    <?php
                    print("<center>".mysql_query("SELECT topicTitle FROM topic")."</center>");
                    ?>
                </tr>
             <?php
                    $queryResult = mysql_query("SELECT * FROM reply");         
                    while ($row = mysql_fetch_array($queryResult)) {
                    $temp1 = $row['owner'];
                    $temp2 = mysql_query("SELECT username FROM user, reply WHERE ".$temp1."=id"); 
                    $temp3 = mysql_fetch_assoc($temp3);
                    print("<tr>");
                    print("<td width=30%><center>". $row['rid']."\n" );
                    print("<font size=4>".$temp3['username']."</font>\n");
                    print($row['dateCreated']. "</center></td>");
                    print("<td width=90%>".$row['contentOfReply']."</td>");
                    print("</tr>");
                    }
             ?>
            </table></center>
        <div>
            <h1><a href="forumIndex.php?<?php echo htmlspecialchars(SID); ?>">Return to Forum Index</a></h1>
            <h1><a href="topicIndex.php?<?php echo htmlspecialchars(SID); ?>">Return to Topic Index</a></h1>
            <h1><a href="createReply.php?<?php echo htmlspecialchars(SID); ?>">Reply to Topic</a></h1>
        </div>
    </body>
</html>